home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 46 / Amiga Format CD46 (1999-10-20)(Future Publishing)(GB)[!][issue 1999-12].iso / -in_the_mag- / reader_requests / scilab / demos / misc / numerique.dem next >
Text File  |  1999-09-16  |  639b  |  31 lines

  1. mode(-1)
  2. write(%io(2),'variables definition ')
  3. //
  4. //
  5. s=poly(0,'s');
  6. n1=poly(154.86,'s','c');d1=s^2+6.075*s+898.72;
  7. n3=270*s^3-80.93*s^2+23.22d4*s-15.47d4;
  8. d3=s^4+12.14*s^3+15.54d2*s^2+92.06d2*s+13.11d3;
  9. n4=8600*s^3+84.502d3*s^2+79.249d5*s+28.984d6;
  10. n5=575*s+28.5d2;
  11. //
  12. f1=n1/d1; f2=n1/d3; f3=n3/d3; f4=n4/d3; f5=n5/d1;
  13. denom=s+3.75;
  14. p2=0.174/denom; p4=-1/denom;
  15. //
  16.  
  17.  
  18. h2= [1 0;f1 1]*[f3+f5*f2 f4;f5        0];
  19. write(%io(2),'Let:')
  20. print(%io(2),h2)
  21. print %io(2),p2,p4);
  22. write(%io(2),'calculation of  p2*h2(1,:)+p4*h2(2,:)')
  23. c1=p2*h2(1,:)+p4*h2(2,:);
  24. print(%io(2),c1)
  25. write(%io(2),'now: [p2 p4]*h2')
  26. c2=[p2 p4]*h2;
  27. print(%io(2),c2);
  28. //
  29.  
  30.  
  31.